package rt.crashmere.apiinterface.controller;

import org.springframework.web.bind.annotation.*;
import rt.crashmere.sdk.model.SDKUser;

/**
 * @author Lwh
 * @time 2023/01/22 22:33
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/get")
    public String getNameByGet(String name) {
        return "GET your name: " + name;
    }

    @PostMapping("/post")
    public String getNameByPost(@RequestParam String name) {
        return "POST your name: " + name;
    }

    @PostMapping("/username")
    public String getUsername(@RequestBody SDKUser user) {
        return "Json your name: " + user.getUsername();
    }


}
